home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Procedure Name:
- // nurbsToPolyCallback
- //
- // Description:
- // Update the option values with the current state of the option box UI.
- //
- // Input Arguments:
- // parent - Top level parent layout of the option box UI. Required so
- // that UI object names can be successfully resolved.
- //
- // doIt - Whether the command should execute.
- //
- // Return Value:
- // None.
- //
-
- global proc nurbsToPolyCallback(string $parent, int $doIt)
- {
- setParent $parent;
-
- int $formatButton = `radioButtonGrp -q -sl format`;
- int $formatValue = 1;
- switch( $formatButton ) {
- case 1:
- $formatValue = 2;
- break;
- case 2:
- $formatValue = 0;
- break;
- }
-
- int $formatButton2 = `radioButtonGrp -q -sl format2`;
- switch( $formatButton2 ) {
- case 1:
- $formatValue = 1;
- break;
- case 2:
- $formatValue = 3;
- break;
- }
-
- nurbsToPolygonsPref -format $formatValue;
- nurbsToPolygonsPref -polyType (`radioButtonGrp -q -sl type` - 1);
- nurbsToPolygonsPref -polyCount (`intSliderGrp -q -v count`);
-
- if( $formatValue == 1 ) { // Format is "Standard Fit"
- nurbsToPolygonsPref -chr (`floatSliderGrp -q -v ratioS`);
- } else {
- nurbsToPolygonsPref -chr (`floatSliderGrp -q -v ratioG`);
- }
- nurbsToPolygonsPref -ft (`floatSliderGrp -q -v fractional`);
- nurbsToPolygonsPref -mel (`floatSliderGrp -q -v minEdgeLength`);
- nurbsToPolygonsPref -d (`floatSliderGrp -q -v delta`);
-
- nurbsToPolygonsPref -uType (`optionMenuGrp -q -sl uType`);
- nurbsToPolygonsPref -uNumber (`intSliderGrp -q -v uNumber`);
- nurbsToPolygonsPref -vType (`optionMenuGrp -q -sl vType`);
- nurbsToPolygonsPref -vNumber (`intSliderGrp -q -v vNumber`);
- nurbsToPolygonsPref -useChordHeight (`checkBoxGrp -q -v1 useChordHeight`);
- nurbsToPolygonsPref -chordHeight (`floatSliderGrp -q -v chordHeight`);
- nurbsToPolygonsPref -useChordHeightRatio
- (`checkBoxGrp -q -v1 useChordHeightRatio`);
- nurbsToPolygonsPref -edgeSwap (`checkBoxGrp -q -v1 edgeSwap`);
-
- if ($doIt) {
- performnurbsToPoly 0;
- addToRecentCommandQueue "performnurbsToPoly 0" "Nurbs To Polygons";
- }
- }
-
-